#!/bin/bash
echo "clean db!!"
rm -rf ./comic_spider_db
echo "start backup mongo!!"
mongodump -h 127.0.0.1  --port 27017 -d comic_spider_db -o ./comic_spider_db
echo "backup mongo finished !!"
echo "=================="
echo "restore  mongo starting  !!"
mongorestore -h tit.pub --port 27017  -d comic_spider_db  --drop ./comic_spider_db/comic_spider_db
echo "restore  mongo finished  !!"
